package com.sgb.kjwl.viewmodel.transport;

import com.sgb.kjwl.model.entity.transport.GoodsInfoEntity3;
import com.sgb.kjwl.repository.TransportRepertory;
import com.sgb.kjwl.view.ui.activity.transport.GoodsInfoOrderSuccessActivity3;
import com.swgk.core.base.BaseViewModel;

import java.util.ArrayList;
import java.util.List;

public class GoodsInfoOrderSuccessModel3 extends BaseViewModel {

    private GoodsInfoOrderSuccessActivity3 activity;
    private TransportRepertory repertory;

    public GoodsInfoOrderSuccessModel3(GoodsInfoOrderSuccessActivity3 a,TransportRepertory r){
        this.activity = a;
        this.repertory = r;
    }

    public void getOrderSuccessList(){
        int page = 1;
        List<GoodsInfoEntity3> list = new ArrayList<>();
        for(int i=0;i<10;i++){
            GoodsInfoEntity3 needsEntity = new GoodsInfoEntity3();
            needsEntity.setGoodsInfoId(i);
            needsEntity.setStartStation("张三_京A000"+(i*page));
            needsEntity.setEndStation("189117900"+(i*page));
            needsEntity.setGoodsName("金属刚才/10吨_"+(i*page));
            needsEntity.setDistances("1000KM");
            needsEntity.setGoodsPrice("￥500/吨");
            needsEntity.setGoodsType("2020-3-20/高栏/15m");

            list.add(needsEntity);
        }

        activity.getOrderSuccessList(list);
    }
}
